package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Permission;
import cn.wolfcode.crm.domain.Permission;
import cn.wolfcode.crm.query.QueryObject;

import java.util.List;

public interface PermissionMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Permission record);

    Permission selectByPrimaryKey(Long id);

    List<Permission> selectAll();

    int updateByPrimaryKey(Permission record);

    int queryCount(QueryObject qo);

    List<Permission> queryList(QueryObject qo);

    /**
     * 查询所有的权限
     * @return 返回所有的权限
     */
    List<String> selectAllResource();

    /**
     * 根据角色id 查询权限信息
     * @param roleId
     * @return
     */
    List<Permission> selectByRoleId(Long roleId);

    /**
     * 根据员工id 查询权限信息
     * @param employeeId
     * @return
     */
    List<String> selectByEmployeeId(Long employeeId);
}